package com.zp.absfactory;

/**
 * @author zhpeng
 * @discription
 * @created 2021/9/3 13:53
 */
public class FactoryProducer {
    public static AbstractFactory getAbstractFactory(String abstractFactory){
        if("".equals(abstractFactory) || abstractFactory == null){
            return null;
        }
        if("geometry".equals(abstractFactory)){
            return new GeometryFactory();
        }else if("color".equals(abstractFactory)){
            return new ColorFactory();
        }
        return null;
    }
}
